Skip to content

Comments

YJDH-789 | Migrate summer voucher serial numbers to actual foreign keys#3842

Merged
karisal-anders merged 4 commits intomainfrom
YJDH-789-link-to-youth-voucher
Jan 28, 2026
Merged

YJDH-789 | Migrate summer voucher serial numbers to actual foreign keys#3842
karisal-anders merged 4 commits intomainfrom
YJDH-789-link-to-youth-voucher

Conversation

@karisal-anders
Copy link
Collaborator

@karisal-anders karisal-anders commented Jan 19, 2026

Description ✨

Migrate EmployerSummerVoucher's summer voucher serial numbers to
actual foreign keys.

Make the employer UI more straightforward by first only showing the parts
that are required, nothing else.

See commit message for more details.

Related

YJDH-789

Testing ⚗️

Automatic tests:

  • Tests added for EmployerSummerVoucher.summer_voucher_serial_number property and its setter.
  • Tests added for the summer voucher serial number data migration functions used in the data migration

Manual testing:

  • Tested the employer UI manually by running it locally using NEXT_PUBLIC_MOCK_FLAG=True and
    creating YouthSummerVoucher and YouthApplication objects with factories to find with the
    fetch_employee_data function.

Screenshots 📸

Additional notes 🗒️

Disabled employer UI browser tests that would need an actual YouthSummerVoucher
for them to work. Previously there was no real link between the EmployerSummerVoucher
and YouthSummerVoucher so the tests passed, but now as they do, and there's no match
in the database, they fail if run. Fixing them would need a way to either mock the data
or have it in the backend.

@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe employer result is failed for https://kesaseteli-pr3842.dev.hel.ninja 😿💢💥💥

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@karisal-anders karisal-anders force-pushed the YJDH-789-link-to-youth-voucher branch from 63d2f17 to 5e8679e Compare January 19, 2026 15:24
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe youth result is failed for https://nuortenkesaseteli-pr3842.dev.hel.ninja 😿💢💥💥

@azure-pipelines
Copy link

TestCafe employer result is failed for https://kesaseteli-pr3842.dev.hel.ninja 😿💢💥💥

@karisal-anders karisal-anders force-pushed the YJDH-789-link-to-youth-voucher branch from 5e8679e to 10e6442 Compare January 21, 2026 15:15
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe employer result is failed for https://kesaseteli-pr3842.dev.hel.ninja 😿💢💥💥

@karisal-anders karisal-anders force-pushed the YJDH-789-link-to-youth-voucher branch from 10e6442 to 15d208b Compare January 22, 2026 13:38
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

YJDH-HELSINKILISA-API branch is deployed to platta: https://helsinkilisa-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

APPLICANT is deployed to platta: https://helsinkilisa-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://helsinkilisa-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://helsinkilisa-ui-handler-pr3842.dev.hel.ninja 😆🎉🎉🎉

Make EmployerSummerVoucherAdmin work better with summer voucher serial
numbers.

Employer UI:
 - fix employer UI so it doesn't needlessly try to fetch_employee_data
   with invalid input. Using De Morgan it was evident the check
   !(a || b || c) <=> !a && !b && !c should actually be !a || !b || !c
   <=> !(a && b && c) instead
 - make the employer summer voucher input UI work so that one has to
   first find a youth summer voucher using the employee name and summer
   voucher serial number, or otherwise they can't continue
 - make the UI more straightforward by first only showing the parts
   that are required, nothing else
 - after succesfully fetching youth summer voucher data from the
   backend the UI no longer allows the user to edit the employee's
   name, social security number or the summer voucher serial number

refs YJDH-789
@karisal-anders karisal-anders force-pushed the YJDH-789-link-to-youth-voucher branch from badb6ec to bec702a Compare January 28, 2026 15:07
@azure-pipelines
Copy link

YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3842.api.dev.hel.ninja 🚀🚀🚀

@sonarqubecloud
Copy link

@sonarqubecloud
Copy link

@azure-pipelines
Copy link

YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

YJDH-HELSINKILISA-API branch is deployed to platta: https://helsinkilisa-pr3842.api.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

EMPLOYER branch is deployed to platta: https://kesaseteli-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://nuortenkesaseteli-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-pr3842.dev.hel.ninja 😆🎉🎉🎉

@karisal-anders karisal-anders merged commit fa61eed into main Jan 28, 2026
105 of 112 checks passed
@karisal-anders karisal-anders deleted the YJDH-789-link-to-youth-voucher branch January 28, 2026 15:26
@azure-pipelines
Copy link

TestCafe result is success for https://kesaseteli-handler-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

APPLICANT is deployed to platta: https://helsinkilisa-ui-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3842.dev.hel.ninja 🚀🚀🚀

@azure-pipelines
Copy link

TestCafe result is success for https://helsinkilisa-ui-pr3842.dev.hel.ninja 😆🎉🎉🎉

@azure-pipelines
Copy link

TestCafe result is success for https://helsinkilisa-ui-handler-pr3842.dev.hel.ninja 😆🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants